﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SupplierConsulta.aspx.cs" Inherits="NewTierra.Pages.SupplierConsulta" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" tagprefix="ajaxToolkit"%>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

      <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
      <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
      <script type="text/javascript" src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>

      <link href="~/Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
        
        #supplier
        {
            height: 798px;
            width: 1330px;
        }
        #SupplierForm
        {
            width: 673px;
            height:688px;
            float: left;
        }
        #SupplierForm .SuppEsq
        {
            float:left;
            width: 324px;
            height: 390px;
        }
        #SupplierForm .SuppDir
        {
            float:left;
            width: 310px;
            height: 393px;
        }
        
        #SupplierForm .FiltrosSupplier
        {
            border: 1px solid #999;
            margin-bottom: 5px;
            padding: 10px;
            background-color: #EEE;
            height: 109px;
            background: #FAFAFA;
	        color: #666;
        }
        
        .BotoesSupplier
        {
            width: 524px;
        }
        
        #SetSupplier
        {
            height: 681px;
            background-color: #fff;
        }
        
        #Tarifas
        {
            height: 537px;
            width: 624px;
            float: left;
            margin-left: 5px;
        }
        
        #SetTarifas
        {
            height: 526px;
            background-color: #fff;
        }
        
        #GridsTarifas
        {
            height: 409px;
            margin-top: 10px;
            width: 612px;
        }
        
        .GridTarifasPeriodo
        {
            width: 609px;
            float: left;
            height: 200px;
        }
        
        .GridTarifasPeriodoBlackout
        {
            width: 610px;
            float: left;
            height: 162px;
        }
        
        .GridTarifasPorPeriodo
        {
            width: 349px;
            height: 161px;
            float: left;
        }
        
        
        .GridTarifasPorPeriodoMeal
        {
            width: 230px;
            float: left;
            height: 162px;
        }
        
        
        #PopAddPeriodo
        {
            width: 428px;
        }
        
        
        .AddPeriodoEsq
        {
            height: 160px;
            float:left;
            width: 188px;
        }
        .AddPeriodoDir
        {
            width: 234px;
            float:left;
            height: 160px;
        }
        
        #PopAddPeriodoBlack
        {
            width: 559px;
        }
        
        .AddPeriodoBlackEsq
        {
            width: 235px;
            float: left;
            height: 170px;
        }
        .AddPeriodoBlackDir
        {
            width: 317px;
            float: left;
            height: 171px;
        }
        
        #PopAddTarifa
        {
            width: 627px;
        }
        
        .PopAddTarifa
        {
            width: 272px;
            float: left;
            height: 359px;
        }
        
        
        .PopAddTarifaDir
        {
            height: 359px;
            width: 352px;
            float: left;
        }
        
       .containerGridPeriodos 
       {
          width: 604px;
          height: 165px;
          background-color: #fff;
          overflow: auto; /* showing scrollbars */
       }
       
       .containerGridBlackout
       {
          width: 465px;
          height: 147px;
          background-color: #fff;
          overflow: auto; /* showing scrollbars */
       }
       
        #Infos
        {
            height: 514px;
        }
        .addInfoLong
        {
            height: 370px;
            width: 930px;
            margin-top: 5px;
        }
        .addInfoShort
        {
            height: 370px;
            width: 930px;
            margin-top: 5px;
        }
        .addInfoOperador
        {
            width: 446px;
            height: 190px;
            margin-top: 5px;
            float:left;
        }
        .AddInfoCliente
        {
            margin-top: 5px;
            height: 195px;
            width: 441px;
            float:left;
        }
        .AddInfoVoucher
        {
            margin-top: 15px;
            height: 153px;
            width: 886px;
            float:left;
        }
        .btnDescricao
        {
            height: 40px;
            width: 775px;
            margin-top: 23px;
        }
        .AddInfoVoucher
        {
            height: 82px;
        }
        .FiltrosSupplierDrops
        {
            height: 52px;
        }
        .FiltrosSupplierDrops .DropTipoSuplierFiltro
        {
            width: 180px;
            float: left;
        }
        .FiltrosSupplierDrops .DropStatusSuplierFiltro
        {
            width: 119px;
            float: left;
        }
        .FiltrosSupplierDrops .DropCidadeSuplierFiltro
        {
            width: 321px;
            float: left;
        }

        .SupplierFormularioCrud
        {
            width: 639px;
            height: 500px;
            padding: 5px;
            display:inline;
	        float: left;
	        position: relative;
            border:1px solid #E6E6E6;
	        background: #EEE;
	        color: #666;
        }

        
    </style>

</head>
<body>

 <script type="text/javascript">
     //JQuery

     $(document).ready(function () {

                $("#PopAddPeriodo").dialog({ modal: true, autoOpen: false, width: 500 });


                $("#btnShowPer").click(
                    function () {
                        $("#PopAddPeriodo").dialog("open");
                    })

                $("#btnShowPer").click(
                    function () {
                        $("#PopAddPeriodo").dialog("open");
                    }
                );

                $(".botao").button();
            }
        );


     function AbrirPopUp(url, title, w, h) {
         var left = (screen.width / 2) - (w / 2);
         var top = (screen.height / 2) - (h / 2);
         return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left + '');
     }



     function CallServerSupplier() {
         document.getElementById('<%= btnFiltroNomeSupplier.ClientID %>').click();
     }

     function OpenInfos(siteInfos) {
         var home = siteInfos;
         javascript: window.open(home);
     }

     function ShowIcon() {
         var e = document.getElementById("processing");
         e.style.visibility = (e.style.visibility == 'visible') ? 'hidden' : 'visible';
     }

    </script>

    <form id="formulario" runat="server">

    <asp:ScriptManager ID="ScriptManagerSupplier" runat="server">
    </asp:ScriptManager>

    <div id="supplier">

           <h2 class="titulo">Supplier</h2>
            <hr />
    
        <asp:UpdatePanel ID="UpdatePanelSupplier" runat="server" RenderMode="Inline">
            <ContentTemplate>

       <asp:TabContainer ID="TabEditarSupplier"  runat="server"  Width="1330px" Height="710px" ActiveTabIndex="0" BorderWidth="0px" BorderStyle="None">
         <asp:TabPanel ID="TabList" runat="server" HeaderText="List">
           <ContentTemplate>

     <div id="SupplierForm">

     <fieldset id="SetSupplier">
     <legend><h3>Supplier</h3></legend>

          <div class="FiltrosSupplier radius">

                <asp:TextBox ID="txtSupplier" runat="server" placeholder="Informe o nome/endereço do supplier." Width="340px" MaxLength="50"></asp:TextBox>

               <asp:RadioButtonList ID="RdoCompleteSupplier" runat="server" AutoPostBack="True" 
                  RepeatDirection="Horizontal" OnSelectedIndexChanged="RdoCompleteSupplier_SelectedIndexChanged">
                <asp:ListItem Value="0" Selected="True">Por Nome</asp:ListItem>
                <asp:ListItem Value="1">Por Endereço</asp:ListItem>
                </asp:RadioButtonList>

                <ajaxToolkit:AutoCompleteExtender ServiceMethod="SearchSuppliers"
                    MinimumPrefixLength="1" 
                    CompletionInterval="100" 
                    EnableCaching="False" 
                    TargetControlID="txtSupplier" 
                    onclientpopulating="ShowIcon"
                    onclientpopulated="ShowIcon"
                    ID="AutoCompleteExtender1" runat="server"
                    onclientitemselected="CallServerSupplier" 
                    DelimiterCharacters="" 
                    Enabled="True">
                </ajaxToolkit:AutoCompleteExtender>

                <img id="processing" alt="load" style="visibility:hidden" src="../../images/ajax-loader.gif" />

              <asp:Button ID="btnFiltroNomeSupplier" style = "display:none" runat="server" 
                  OnClick="CarregarSuppliersNome"/>   

              <br />

              <div class="FiltrosSupplierDrops">

                  <div class="DropTipoSuplierFiltro">
                      <asp:Label runat="server" ID="lblTipoSupplierFiltroTXT" Text="Tipo Supplier:" /> <br />
                        <asp:DropDownList ID="DDTipoSupFiltro" OnSelectedIndexChanged="DDTipoSupFiltro_SelectedIndexChanged" runat="server" 
                            AppendDataBoundItems="True" AutoPostBack="True" >
                        </asp:DropDownList>
                  </div>

                  <div class="DropStatusSuplierFiltro">
                      <asp:Label runat="server" ID="lblStatusFiltroTXT" Text="Status:" /><br />
                        <asp:DropDownList ID="DDStatusFiltro" OnSelectedIndexChanged="DDStatusFiltro_SelectedIndexChanged" runat="server" AutoPostBack="True" 
                            AppendDataBoundItems="True" >
                        </asp:DropDownList>
                  </div>

                  <div class="DropCidadeSuplierFiltro">
                      <asp:Label runat="server" ID="lblCidadeFiltroTXT" Text="Cidade:" /><br />
                        <asp:DropDownList ID="ddlCidadeFiltro" OnSelectedIndexChanged="ddlCidadeFiltro_SelectedIndexChanged" runat="server" AutoPostBack="True" 
                            AppendDataBoundItems="True" >
                        </asp:DropDownList>
                </div>

              </div>
              
          </div>

         <div class="SupplierFormularioCrud radius">
             <h2 class="headline radius"><asp:Label ID="lblTituloNomeSupplier" runat="server" Text=""/></h2>
                <div class="SuppEsq">

                <asp:TextBox ID="txtCodigo" runat="server"  Width="50px" style="display: none;" ReadOnly="True"/>
						
                <p class="paragrafo">
				    <asp:Label ID="lblNomeSupplier" runat="server" Text="Nome:"></asp:Label><br />
                    <asp:TextBox ID="txtNome" MaxLength="50" runat="server" Width="300px"/>
                    <asp:RequiredFieldValidator 
                    ID="RqFieldNomeSupplier" 
                    runat="server" 
                    ControlToValidate="txtNome" 
                    ErrorMessage="*" 
                    ValidationGroup="Salvar" ToolTip="Informe um nome."></asp:RequiredFieldValidator>
                </p>

                <p class="paragrafo">
				    <asp:Label ID="lblRazaoSocialSupplier" runat="server" Text="Razão Social:"></asp:Label><br />
                    <asp:TextBox ID="txtRazaoSocial" MaxLength="50" runat="server" Width="300px"/>
                    <asp:RequiredFieldValidator 
                    ID="RqFieldRazaoSocial" 
                    runat="server" 
                    ControlToValidate="txtRazaoSocial" 
                    ErrorMessage="*" 
                    ValidationGroup="Salvar" ToolTip="Informe uma razão social."></asp:RequiredFieldValidator>
				</p>
                
                <p class="paragrafo">
                    <asp:Label ID="lblCNPJCPFSupplier" runat="server" Text="CNPJ/CPF:"></asp:Label><br />
                    <asp:TextBox ID="txtCnpjCpf" MaxLength="50" runat="server" Width="250px" />
                    <asp:RequiredFieldValidator 
                    ID="RqFieldCnpj" 
                    runat="server" 
                    ControlToValidate="txtCnpjCpf" 
                    ErrorMessage="*" 
                    ValidationGroup="Salvar" ToolTip="Informe um cnpj/cpf."></asp:RequiredFieldValidator>
                </p>
                
                <p class="paragrafo">
                    <asp:Label ID="lblEnderecoSupplier" runat="server" Text="Endereço: "></asp:Label><br />
                    <asp:TextBox ID="txtEndereco" MaxLength="250" runat="server" Width="300px" TextMode="MultiLine" />
                </p>         
                
                <p class="paragrafo">
                    <asp:Label ID="lblTelefonePLSupplier" runat="server" Text="Telefone de Plantão:"></asp:Label><br />
                    <asp:TextBox ID="txtTelefonePL" MaxLength="15" runat="server" Width="150px"/>
                </p>    
                
                <p class="paragrafo">
                    <asp:Label ID="lblTelefoneSupplier" runat="server" Text="Telefone:"></asp:Label><br />
                    <asp:TextBox ID="txtTelefone" MaxLength="15" runat="server" Width="150px"/>
                    <asp:RequiredFieldValidator 
                    ID="RqFieldTelefone" 
                    runat="server" 
                    ControlToValidate="txtTelefone" 
                    ErrorMessage="*" 
                    ValidationGroup="Salvar" ToolTip="Informe um telefone."></asp:RequiredFieldValidator>
                </p>     

                <p class="paragrafo">
                    <asp:Label ID="lblSiteSupplier" runat="server" Text="Site:"></asp:Label><br />
                    <asp:TextBox ID="txtSite" MaxLength="300" runat="server" Width="300px"/>
                </p>  

                </div>

                <div class="SuppDir">    

                <p class="paragrafo">
                    <asp:Label ID="lblEmailSupplier" runat="server" Text="Email:"></asp:Label>
                    <br /><asp:TextBox ID="txtEmail" MaxLength="50" runat="server" Width="300px"/>
                </p>
                   
                <p class="paragrafo">
                    <asp:Label ID="lblRedeSupplier" runat="server" Text="Rede:"></asp:Label><br />
                    <asp:DropDownList ID="DDRede" runat="server">
                    </asp:DropDownList>
                </p>
                
                <p class="paragrafo">
                    <asp:Label ID="lblStatusSupplier" runat="server" Text="Status:"></asp:Label><br />
                    <asp:DropDownList ID="DDStatus" runat="server">
                    </asp:DropDownList>
                </p>        
              
                <p class="paragrafo">        
                    <asp:Label ID="lblTipoSupSupplier" runat="server" Text="Tipo Supplier:"></asp:Label><br /> 
                    <asp:DropDownList ID="DDTipoSup" runat="server">
                    </asp:DropDownList>
                </p>       
                
                <p class="paragrafo">
                    <asp:Label ID="lblClassificacaoSupplier" runat="server" Text="Classificação:"></asp:Label><br />
                    <asp:DropDownList ID="DDClassificacao" runat="server">
                    </asp:DropDownList>
                </p>                
                
                <p class="paragrafo">
                    <asp:Label ID="lblPaisSupplier" runat="server" Text="País:"></asp:Label><br />
                    <asp:DropDownList ID="DDPais" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDPais_SelectedIndexChanged">
                    </asp:DropDownList>
                </p> 
                
                <p class="paragrafo">
                    <asp:Label ID="lblCidadeSupplier" runat="server" Text="Cidade:"></asp:Label><br /> 
                    <asp:DropDownList ID="DDCidade" runat="server">
                    </asp:DropDownList>
                </p>     

                </div>

                <div class="BotoesSupplier">
                    
                   <asp:Button ID="btnNovoSupplier" runat="server"  Text="Salvar" CssClass="btnsGeral" OnClick="CadastrarSupplier"  ValidationGroup="Salvar"  />
                   <asp:Button ID="btnAtualizarSupplier" runat="server" OnClick="AtualizarSupplier" Text="Atualizar" CssClass="btnsGeral" ValidationGroup="Salvar"  />
                   <asp:Button ID="btnExcluirSupplier" runat="server" OnClick="ExcluirSupplier" Text="Excluir" CssClass="btnsGeral" OnClientClick="return confirm('Excluindo esse supplier, todos os períodos e tarifas do mesmo também serão excluídas. Confirma?');"  />
                   <asp:Button ID="btnLimparSupplier" runat="server" OnClick="btnLimparSupplier_Click" Text="Limpar" CssClass="btnsGeral" />

                <br />

                <asp:Label ID="lblMsgCadSupplier" runat="server" Font-Bold="True"></asp:Label>

                    </div>
         </div>

              </fieldset>
            </div>

        
       <div id="Tarifas">                      

             <fieldset id="SetTarifas">
             <legend><h3>Tarifas</h3></legend>
             
        <asp:Panel ID="PanelTarifas" runat="server" Visible="false">

             <div class="BotoesTarifas">

                 <input id="btnShowPeriodo" class="btnsGeral" onclick="AbrirPopUp('AddPeriodo.aspx?Tipo=salvar', 'Periodo', '450', '360')" type="button" value="Períodos"/>
                 
                 <input id="btnshowPerBlack" class="btnsGeral" onclick="AbrirPopUp('AddPeriodoBlack.aspx', 'Blackout', '450', '350')" type="button" value="Blackout" />

                 <input id="btnShowCopiarTarifa" class="btnsGeral" value="Copiar Tarifas" onclick="AbrirPopUp('TarifasCopiar.aspx', 'CopiarTarifas', '450', '350')" type="button"  />
                 
                 <input id="btnShowContatos" class="btnsGeral" value="Contato" onclick="AbrirPopUp('AddContatos.aspx', 'Contatos', '910', '340')" type="button"  />

                 <br /><br />
                  <asp:Label ID="lblFiltroMercadosTXT" runat="server" Text="Mercado: " /> 
                  <asp:DropDownList ID="DropMercados" runat="server" AutoPostBack="True" onselectedindexchanged="DropMercados_SelectedIndexChanged">
                  </asp:DropDownList>

                  <asp:Label ID="lblFiltroBaseTarifariaTXT" runat="server" Text="Base Tarifária: " />  
                  <asp:DropDownList ID="DropBaseTarifarias" runat="server" AutoPostBack="True" onselectedindexchanged="DropBaseTarifarias_SelectedIndexChanged">
                  </asp:DropDownList>

                  <%--<asp:Button ID="btnAtualizarPeriodos" runat="server" Text="Atualizar Períodos" OnClick="CarregarDadosPeriodos" />--%>


             </div>
                     
                        <div id="GridsTarifas">
        

        <div class="GridTarifasPeriodo">
        
        <asp:Label ID="lblGridPeriodosTXT" runat="server" Text="Períodos" />  
        <asp:ImageButton ID="btnAtualizarGridPeriodos" runat="server" ImageUrl="~/images/Icones/icone_atualizar.gif" 
                  OnClick="AtualizaGridsPeriodo_PeriodoBlack" />
         
         <div class="containerGridPeriodos">

        <asp:GridView ID="GridTarifasPeriodo" runat="server" 
         AutoGenerateColumns="False" GridLines="None" CssClass="mGrid" EmptyDataText="Não existe Periodos para esse Supplier."
            Height="16px" onselectedindexchanged="GridTarifasPeriodo_SelectedIndexChanged"  
                 Width="94px">
           <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
           <Columns>


           <asp:BoundField DataField="S_merc_periodo_id" HeaderText="ID" ReadOnly="True" 
                     SortExpression="S_merc_periodo_id" InsertVisible="False">

                 <FooterStyle CssClass="invisible" />
               <HeaderStyle CssClass="invisible" />
               <ItemStyle CssClass="invisible" />
               </asp:BoundField>


                 <asp:BoundField DataField="S_merc_periodo_from" HeaderText="From"
                     SortExpression="S_merc_periodo_from" DataFormatString="{0:dd/MM/yy}">
                      <ItemStyle Wrap="False" />
               </asp:BoundField>

                      <asp:BoundField DataField="S_merc_periodo_to" HeaderText="To" 
                     SortExpression="S_merc_periodo_to" DataFormatString="{0:dd/MM/yy}">
                      <ItemStyle Wrap="False" />
               </asp:BoundField>


                      <asp:BoundField DataField="S_mercado_estacao_nome" HeaderText="Estação" SortExpression="S_mercado_estacao_nome">
                      <ItemStyle Wrap="False" />
                      </asp:BoundField>
                     
                      <asp:BoundField DataField="S_mercado_per_fds_from" HeaderText="Fds From" 
                     SortExpression="S_mercado_per_fds_from" 
                   DataFormatString="{0:dd/MM/yy}">
                          <HeaderStyle Wrap="False" />
                          <ItemStyle Wrap="False" />
               </asp:BoundField>

                      <asp:BoundField DataField="S_mercado_per_fds_to" HeaderText="Fds To" 
                     SortExpression="S_mercado_per_fds_to" DataFormatString="{0:dd/MM/yy}">
                          <HeaderStyle Wrap="False" />
                          <ItemStyle Wrap="False" />
               </asp:BoundField>

               <asp:BoundField DataField="Pacote_nome" HeaderText="Pacote" SortExpression="Pacote_nome">
               <HeaderStyle Wrap="True" />
               <ItemStyle Wrap="True" />
               </asp:BoundField>

                     <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                     <asp:ImageButton ID="VerTarifas" 
                        runat="server"  ToolTip="Ver Tarifas"
                        CommandArgument='<%# Eval("S_merc_periodo_id") %>'
                        oncommand="AbrirPopUpVerTarifas" ImageUrl="~/images/Icones/vertarifas.png" />
                    </ItemTemplate>
                     <HeaderStyle Wrap="False" />
                     <ItemStyle Wrap="False" />
                </asp:TemplateField>

                <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <asp:ImageButton ID="AddTarifasGrid" 
                        runat="server"  ToolTip="Adicionar Tarifas"
                        CommandArgument='<%# Eval("S_merc_periodo_id") %>'
                        oncommand="AbrirPopUpTarifas" 
                         ImageUrl="~/images/Icones/tarifas.png"/>
                    </ItemTemplate>
                          <HeaderStyle Wrap="False" />
                          <ItemStyle Wrap="False" />
                </asp:TemplateField>

                <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                     <asp:ImageButton ID="lnkEditarPeriodo" ToolTip="Editar Periodo" 
                        runat="server"  ImageUrl="~/images/Icones/edit.png"
                        CommandArgument='<%# Eval("S_merc_periodo_id") %>'
                        oncommand="AbrirPopUpEditarPeriodo" />
                    </ItemTemplate>
                     <HeaderStyle Wrap="False" />
                     <ItemStyle Wrap="False" />
                </asp:TemplateField>

                 <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <asp:ImageButton ID="ExluirPeriodosTarifas"  ToolTip="Excluir Periodo"
                        runat="server" CommandArgument='<%# Eval("S_merc_periodo_id") %>'
                        oncommand="ExcluirPeriodosTarifas" OnClientClick="return confirm('Excluindo esse período, todas as tarifas do mesmo também serão excluídas. Confirma?');"
                         ImageUrl="~/images/Icones/delete.png" />
                    </ItemTemplate>
                          <HeaderStyle Wrap="False" />
                          <ItemStyle Wrap="False" />
                </asp:TemplateField>

        </Columns>

        <PagerStyle CssClass="pgr"></PagerStyle>

        </asp:GridView>
             <br />

             <div id="TarifasTableContainer"></div>
       </div>

        </div>

        
        <div class="GridTarifasPeriodoBlackout">

         <asp:Label ID="lblGridPeriodosBlack" runat="server" Text="Períodos Blackout" />
            <div class="containerGridBlackout">  
         <asp:GridView ID="GridTarifasPeriodoBlack" runat="server" AllowPaging="True"
         AutoGenerateColumns="False" GridLines="None" CssClass="mGrid" EmptyDataText="Não existe Periodo Blackout para esse Supplier."
            Height="16px" PageSize="5" OnPageIndexChanging="PaginarDadosPeriodosBlackout" 
                Width="36px">
           <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

           <Columns>
           <asp:BoundField DataField="S_merc_periodo_black_id" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="S_merc_periodo_black_id">
                <FooterStyle CssClass="invisible" />
                <HeaderStyle CssClass="invisible" />
                <ItemStyle CssClass="invisible" />
           </asp:BoundField>
                

                   <asp:BoundField DataField="S_merc_periodo_black_from" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Data From" SortExpression="S_merc_periodo_black_from">
                   <HeaderStyle Wrap="False" />
                   </asp:BoundField>


           <asp:BoundField DataField="S_merc_periodo_black_to" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Data To" SortExpression="S_merc_periodo_black_to" />
           
           <asp:BoundField DataField="S_merc_periodo_black_obs" HeaderText="Obs" SortExpression="S_merc_periodo_black_obs">
           </asp:BoundField>

           <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <asp:ImageButton ID="ExluirPeriodosTarifas" 
                        runat="server" CommandArgument='<%# Eval("S_merc_periodo_black_id") %>'
                        oncommand="ExcluirPeriodosTarifasBlackout" 
                        ToolTip="Excluir Blackout" ImageUrl="~/images/Icones/delete.png" />
                    </ItemTemplate>
                          <HeaderStyle Wrap="False" />
                          <ItemStyle Wrap="False" />
                </asp:TemplateField>

        </Columns>
        
        <PagerStyle CssClass="pgr"></PagerStyle>

        </asp:GridView>
            </div>
        </div>
            <br /><br />
        <asp:Label ID="lblMsgGridPeriodos" runat="server" Text="" />

        </div>
            </asp:Panel> 
               </fieldset>
           
        </div>
              
                         </ContentTemplate>
         </asp:TabPanel>



          <asp:TabPanel ID="TabInfos" runat="server" HeaderText="Infos">
           <ContentTemplate>

           <div id="Infos">

            <input id="btnShowAddFotoCategoria" class="btnsGeral" value="Add Fotos e Categoria" onclick="AbrirPopUp('AddFoto_Categoria.aspx', 'Fotos', '820', '460')" type="button" />

            <input id="btnShowInfoSupplier" class="btnsGeral" value="Info Supplier" onclick="OpenInfos('InfoSupplier.aspx')" type="button" />
    
            <br /><br /><br />

    <asp:TabContainer ID="TabContainerInfos" runat="server"  Width="950px" Height="400px" ActiveTabIndex="0" BorderWidth="0px" BorderStyle="None">
         
         <asp:TabPanel ID="TabInfoLong" runat="server" HeaderText="Descrição Completa">
           <ContentTemplate>

            <div class="addInfoLong">
   
            <cc1:Editor ID="EditorInfoLong" runat="server" NoUnicode="true" />
            </div>

            </ContentTemplate>
         </asp:TabPanel>

         <asp:TabPanel ID="TabInfoShort" runat="server" HeaderText="Descrição Curta">
           <ContentTemplate>

            <div class="addInfoShort">

                <cc1:Editor ID="EditorInfoShort" runat="server" NoUnicode="true" />
            </div>

            </ContentTemplate>
         </asp:TabPanel>

          <asp:TabPanel ID="TabOperador" runat="server" HeaderText="Descrição Operador">
           <ContentTemplate>

            <div class="addInfoOperador">
                <asp:Label ID="lblRemarksTXT" runat="server" Text="Remarks" /><br />
                <asp:TextBox ID="txtremarks" runat="server" Height="180px" TextMode="MultiLine" 
                    Width="430px" />
            </div>

            <div class="AddInfoCliente">
            <asp:Label ID="lblInfoClienteTXT" runat="server" Text="Infos do Cliente" /><br />
                <asp:TextBox ID="txtInfoCliente" runat="server" Height="180px" TextMode="MultiLine" 
                    Width="430px" />
            </div>

            <div class="AddInfoVoucher">
              <asp:Label ID="lblInfoVoucherTXT" runat="server" Text="Infos do Voucher" /><br />
              <asp:TextBox ID="txtInfoVoucher" runat="server" Height="130px" TextMode="MultiLine" 
                    Width="872px" />
            </div>

              </ContentTemplate>
         </asp:TabPanel>
       </asp:TabContainer>


            <div class="btnDescricao">
            
                <asp:Button ID="btnCadastrarDescricao" runat="server" CssClass="btnsGeral" Text="Salvar" OnClick="CadastrarDescricao" ValidationGroup="SalvarDescricao"/>
                <asp:Button ID="btnAtualizarDescricao" runat="server" CssClass="btnsGeral" Text="Atualizar" OnClick="AtualizarDescricao" ValidationGroup="SalvarDescricao" />
                <asp:Button ID="btnEscluirDescricao" runat="server" CssClass="btnsGeral" Text="Excluir" OnClick="ExcluirDescricao" />
                <asp:Button ID="btnLimparDescricao" runat="server" CssClass="btnsGeral" Text="Limpar" onclick="LimparDescricao"/>
                
                    <asp:Label ID="lblMsgCadDescricao" runat="server" Font-Bold="True" ForeColor="#CC0000"></asp:Label>

            </div>

            </div>

           </ContentTemplate>
         </asp:TabPanel>

                  </asp:TabContainer>
                       </ContentTemplate>
                

        </asp:UpdatePanel>
        
         <!-- Área de Pre-Carregamento -->
    <div id="UpdateProgress" 
            style="position:absolute; z-index:1; left: 50%; top: 50%;">
        <asp:UpdateProgress ID="preLoading" runat="server"
            AssociatedUpdatePanelID="UpdatePanelSupplier">
            <ProgressTemplate>
            
                <asp:Image ID="imgLoading" runat="server"
                    ImageUrl="~/Images/ajax-loaderG.gif"/>

            </ProgressTemplate>
        </asp:UpdateProgress>   
        </div>



       </div>


    </form>
</body>
</html>
